import 'package:flutter/material.dart';
import 'package:fluro/fluro.dart';

import 'package:logging/logging.dart';

// fluro 路由
import './main_tabbar.dart';

import 'screens/home/home_screen.dart';
import 'screens/order/order_screen.dart';
import 'screens/mine/mine_screen.dart';
import 'screens/splash/splash_screen.dart';


import 'screens/authen/signin/signin_screen.dart';
import 'screens/authen/signup/signup_screen.dart';
import 'screens/authen/find_password/find_password_screen.dart';
import 'screens/authen/reset_password/reset_password_screen.dart';

final _logger = new Logger("route handler");

var rootHandler = new Handler(
  handlerFunc: (BuildContext context, Map<String, List<String>> params) {
    return MainTabbar();
  }
);

var splashHandler = new Handler(
  handlerFunc: (BuildContext context, Map<String, List<String>> params) {
    _logger.finest(" ------ ==== root router $params ");
    return SplashScreen();
});

var homeHandler = new Handler(
  handlerFunc: (BuildContext context, Map<String, List<String>> params) {
    _logger.finest(" ------ ==== home router $params ");
    
    return HomeScreen();
});

var orderHandler = new Handler(
  handlerFunc: (BuildContext context, Map<String, List<String>> params) {
    _logger.finest(" ------ ==== order router $params ");    
    return OrderScreen();
});

var mineHandler = new Handler(
  handlerFunc: (BuildContext context, Map<String, List<String>> params) {
    _logger.finest(" ------ ==== mine router $params ");    
    
    return MineScreen();
});


// authen

var signinHandler = new Handler(
  handlerFunc: (BuildContext context, Map<String, List<String>> params) {
    _logger.finest(" ------ ==== signin router $params ");    
    
    return SigninScreen();
});

var signupHandler = new Handler(
  handlerFunc: (BuildContext context, Map<String, List<String>> params) {
    _logger.finest(" ------ ==== signup router $params ");    
    
    return SignupScreen();
});

var findpasswordHandler = new Handler(
  handlerFunc: (BuildContext context, Map<String, List<String>> params) {
    _logger.finest(" ------ ==== find password router $params ");    
    
    return FindPasswordScreen();
});

var resetpasswordHandler = new Handler(
  handlerFunc: (BuildContext context, Map<String, List<String>> params) {
    _logger.finest(" ------ ==== reset password router $params ");    
    
    return ResetPasswordScreen();
    
});



